From 3816060ac4bcfa10b11e1cb9fcfa78fbcabb8250 Mon Sep 17 00:00:00 2001 From: Markus Rost Date: Wed, 18 Feb 2004 20:47:46 +0000 Subject: [PATCH] (executable-command-find-posix-p): Fix choice of the directory. --- lisp/progmodes/executable.el | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index b301d84d144..a5d401a5f5e 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el @@ -145,12 +145,8 @@ See `compilation-error-regexp-alist'.") "Check if PROGRAM handles arguments Posix-style. If PROGRAM is non-nil, use that instead of \"find\"." ;; Pick file to search from location we know - (let* ((dir (car load-path)) - (file (find-if - (lambda (x) - ;; Filter directories . and .. - (not (string-match "^\\.\\.?$" x))) - (directory-files dir)))) + (let* ((dir (file-truename data-directory)) + (file (car (directory-files dir nil "^[^.]")))) (with-temp-buffer (call-process (or program "find") nil -- 2.30.2